home *** CD-ROM | disk | FTP | other *** search
-
-
-
- - 1 -
-
-
-
- 4. _S_a_m_p_l_e__C_o_d_e
-
-
- This release includes some sample programs to help get you
- started with the Data Conversion Service API. After
- installing goldengate.sw.demo, in /usr/share/src/GoldenGate
- you will find several subdirectories. Each subdirectory is
- self-contained and includes one or more C or C++ source
- files, a Makefile and any other files needed by the
- particular example.
-
- To help you get started writing converters, sample converter
- code is included as well as several short demo applications.
-
- The converter sample directory includes a file with the
- extension ".cdf". This is a Converter Definition File. You
- will see entries with the same syntax in the system
- converter registry file /etc/ConverterRegistry. The
- registry is the means by which the service can locate your
- converters.
-
- The converters named in the default registry file all live
- in the DSO /usr/lib/convert/libcvt_SGI.so. When you run the
- make file that comes with the sample converter named
- "CvtToLower" you will generate another DSO named (by
- default) libUserCvtrs.so. If you rename this DSO, you must
- remember to change the CDF to reference the new name so that
- GoldenGate can find your converters.
-
- To test your own converters without disrupting the system
- registry, you can set the environment variable
- CVT_REGISTRY_OVERRIDE to the full pathname of your converter
- definition file. For instance you can say:
-
- cd MyTestConverterDir
-
- setenv CVT_REGISTRY_OVERRIDE `pwd`/CvtToLower.cdf
-
- Your program will temporarily use the definition file for
- your sample converter instead of the system registry. You
- should only set this technique while testing your
- converters. Once a converter is finished, it should be
- installed. To install, copy your DSO to /usr/lib/convert or
- another directory where you want to keep converter DSOs. In
- your CDF, you can include a full pathname in the DSO
- specification, or just type the filename and the system will
- look in /usr/lib/convert for the library. You must then add
- your CDF to the system registry to make it visible to the
- conversion service.
-
-
-
-
-
-
-
-
-
-
-